﻿<Window x:Class="CalligraphyEditor.ShowPhotoes"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="clr-namespace:CalligraphyEditor.ViewModel"
        Title="上传图片" Height="600" Width="900">
    <Window.Resources>
        <DataTemplate x:Name="show_template" x:Key="show_template">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="5"/>
                    <RowDefinition Height="130"/>
                    <RowDefinition Height="5"/>
                    <RowDefinition Height="5"/>
                    <RowDefinition Height="30"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="140"/>
                    <ColumnDefinition Width="5"/>
                    <ColumnDefinition Width="140"/>
                </Grid.ColumnDefinitions>
                <Image Source="{Binding PhotoPath}" Grid.Column="1" Grid.Row="1" />
                <!--<Image Name="ima_progressBar"  Source="Circles.gif" Grid.Column="1" Grid.Row="1" />-->
                <ProgressBar Name="pgb_photo" Height="5" Width="120" Grid.Row="2" Grid.Column="1"  Maximum="2" Minimum="0"/>
                <TextBlock Text="{Binding Text}" Grid.Column="3" Grid.Row="1" />
                <TextBlock Text="{Binding PageNumber}" Grid.Column="1" Grid.Row="4" TextAlignment="Center"/>
                <TextBlock Text="译文" Grid.Column="4" Grid.Row="4" TextAlignment="Center"/>
            </Grid>
        </DataTemplate>
        <vm:VMRubbingPhotos x:Key="rpvm"/>
    </Window.Resources>
    <Grid  Name="layoutBoot" DataContext="{Binding Source={StaticResource rpvm},Path=Ocl}" Margin="0,0,0,52">
        <ListBox Name="ltb_show"  ItemTemplate="{StaticResource show_template}" ItemsSource="{Binding}" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
            <ListBox.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel Name="wrapPanel" HorizontalAlignment="Stretch"/>
                </ItemsPanelTemplate>
            </ListBox.ItemsPanel>
        </ListBox>
        <Button Name="btn_start" Height="35" Width="70" Content="上传" Margin="631,522,191,-40" Click="btn_start_Click" />
        <Button Name="btn_completed" Height="35" Width="70" Content="完成" Margin="785,522,37,-40" Click="btn_completed_Click" Visibility="Hidden"/>
        <ProgressBar Name="pro_UploadPhotoes1" Height="30" Margin="0,527,640,-40" Visibility="Hidden"  />
        <Label Name="lab_u" Content="已上传" Height="30" Margin="270,527,547,-40"/>
        <Label Name="lab_UploadPercentage" Height="30" Width="50" Margin="364,527,478,-40" RenderTransformOrigin="1.002,0.439"/>
    </Grid>
</Window>
